package com.ogawa.meiditest.receiver

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.net.wifi.WifiManager
import android.util.Log

class WifiBroadcastReceiver : BroadcastReceiver() {

    var scanFinishListener: OnWifiScanFinishListener? = null

    override fun onReceive(context: Context?, intent: Intent?) {
        if (intent?.action == WifiManager.SCAN_RESULTS_AVAILABLE_ACTION) {
            Log.e("tag","----------onScanFinish---------------")
            scanFinishListener?.onScanFinish()
        }
    }
}

interface OnWifiScanFinishListener {
    fun onScanFinish()
}